import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface BaseApiReq extends BasicModel<BaseApiReq> {
 
}

export interface BadeApiResult extends BasicModel<BadeApiResult> {

}
/**
 * 获取股票利润率折现数据
 * @param params 
 * @returns 
 */
export const getNetProfitDatas = (params?: Recordable | any) => {
  var { stockCode } = params;
  return defHttp.get<Recordable>({ url: adminPath+'/finace/chart/getNetProfitDatas/'+stockCode, params });
}
/**
 * 获取营收增长率折线图数据
 * @param params 
 * @returns 
 */
export const getRevenueDatas = (params?: Recordable | any) => {
  var { stockCode } = params;
  return defHttp.get<Recordable>({ url: adminPath+'/finace/chart/getRevenueDatas/'+stockCode, params });
}

/**
 * 利润率变化折线图数据
 * @param params 
 * @returns 
 */
export const getGrossProfit = (params?: Recordable | any) => {
  var { stockCode } = params;
  return defHttp.get<Recordable>({ url: adminPath+'/finace/chart/getGrossProfit/'+stockCode, params });
}
